package com.stone.design.mode.state.spring;

import java.util.Map;

/**
 * 订单service
 *
 * @author wenpan 2022/06/18 17:28
 */
public interface OrderService {

    /**
     * 创建订单
     *
     * @return com.stone.design.mode.state.spring.Order
     */
    Order create();

    /**
     * 支付订单
     *
     * @param id 订单ID
     * @return com.stone.design.mode.state.spring.Order
     */
    Order pay(int id);

    /**
     * 订单发货
     *
     * @param id 订单ID
     * @return com.stone.design.mode.state.spring.Order
     */
    Order deliver(int id);

    /**
     * 订单收货
     *
     * @param id 订单ID
     * @return com.stone.design.mode.state.spring.Order
     */
    Order receive(int id);

    /**
     * 获取订单
     *
     * @return java.util.Map
     */
    Map<Integer, Order> getOrders();
}
